package com.zhuangjie.coupon.enums;

import com.zhuangjie.mvc.validator.annotate.enum_valid.VerifiableEnum;

/**
 * 优惠卷使用有效期类型
 */
public enum CouponUsageValidityPeriodType implements VerifiableEnum {
    FIXED_DATE((byte) 1, "固定日期"),
    RELATIVE_VALIDITY((byte) 2, "相对有效期");

    private final byte code;
    private final String name;

    CouponUsageValidityPeriodType(byte code, String name) {
        this.code = code;
        this.name = name;
    }

    public byte getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    @Override
    public byte getValue() {
        return getCode();
    }
}